//
//  MineViewController.m
//  CWRD
//
//  Created by lanou on 15/9/17.
//  Copyright (c) 2015年 lanou. All rights reserved.
//

#import "MineViewController.h"
#import "MyView.h"
#import "MyCollectionViewController.h"
#import "SwitchViewController.h"
#import "MoreViewController.h"
@interface MineViewController ()

@end

@implementation MineViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor blackColor];
    
    BlurImageView *blur = [[BlurImageView alloc] initWithFrame:kBounds];
    MyView *myView = [[MyView alloc] initWithFrame:CGRectMake(0, 0, kWidth, kHeight)];
    [blur addSubview:myView];
    [self.view addSubview:blur];
    
    //我的界面里面的按钮添加方法
    [myView.myCollection addTarget:self action:@selector(myCollection) forControlEvents:UIControlEventTouchUpInside];
    
    [myView.mySwitch addTarget:self action:@selector(mySwitch) forControlEvents:UIControlEventTouchUpInside];
    
    [myView.more addTarget:self action:@selector(more) forControlEvents:UIControlEventTouchUpInside];
}

//我的收藏界面
- (void)myCollection{
    MyCollectionViewController *myCollection = [[MyCollectionViewController alloc] init];
    UINavigationController *navC = [[UINavigationController alloc] initWithRootViewController:myCollection];
    [self presentViewController:navC animated:YES completion:nil];
}



//开关界面
- (void)mySwitch{
    SwitchViewController *mySwitch = [[SwitchViewController alloc] init];
    UINavigationController *navC = [[UINavigationController alloc] initWithRootViewController:mySwitch];
    [self presentViewController:navC animated:YES completion:nil];
}


//更多界面
- (void)more{
    MoreViewController *more = [[MoreViewController alloc] init];
    UINavigationController *navC = [[UINavigationController alloc] initWithRootViewController:more];
    [self presentViewController:navC animated:YES completion:nil];
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
